{extend name="mainadmin@layouts/base" /}
{block name="head" }
<link href="__STATIC__/main/css/stylesheets/uploadify/uploadify.min.css" rel="stylesheet"/>
{/block}
{block name="main" }

<header class="header  b-b clearfix">
    <div class="page-breadcrumbs">
        <ul class="breadcrumb">
            <li>
                <i class="fa fa-ellipsis-v"></i>
                <strong>{$row['id']>0?"编辑公司":"添加公司"}</strong>
            </li>
        </ul>
        <a class="text-muted pull-right m-r-tm m-t-md pointer" data-toggle="back" title="返回"><i class="fa fa-reply"></i></a>
    </div>
</header>
<form class="form-horizontal form-validate form_vbox" method="post" action="{:url('info')}" style="padding:0;">
    <section class="vbox">
        <section class="scrollable  wrapper w-f">
            <section class="panel panel-default">

                <div class="panel-body">
                    <div class="form-group">
                        <label class="control-label">仓库名称：</label>
                        <div class="col-sm-7">
                            <input type="text" class="input-max" data-rule-maxlength="40" data-rule-required="true"
                                   data-msg-required="仓库名称不能为空" name="title" value="{$row.title}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class=" control-label">所在地区：</label>
                        <div class="col-sm-6">
                            <select name="province" id="province" style="width:150px;" class="region_sel"
                                    nextsel="city|district" sel_val="100000|{$row.province}">
                                <option value="">请选择</option>
                            </select>
                            <select name="city" id="city" style="width:150px;" class="region_sel" nextsel="district"
                                    sel_val="{$row.province}|{$row.city}">
                                <option value="">请选择</option>
                            </select>
                            <select name="district" id="district" style="width:150px;" class="region_sel"
                                    sel_val="{$row.city}|{$row.district}">
                                <option value="">请选择</option>
                            </select>
                        </div>
                    </div>


                    <div class="form-group">
                        <label class="control-label">详细地址：</label>
                        <div class="col-sm-7">
                            <input type="text" class="input-max" data-rule-maxlength="40" data-rule-required="true"
                                   data-msg-required="仓库地址不能为空" name="address" value="{$row.address}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label">快递接口：</label>
                        <div class="col-sm-7">
                            {volist name="row['shop_logistics_api']" id="vo" }
                            <label class="radio-inline">
                                <input type="radio" name="logistics_api" {if condition="$row.logistics_api eq $vo.id " }
                                       checked{/if} value="{$vo.id}" >{$vo.name}
                            </label>
                            {/volist}
                            <label class="radio-inline">
                                <input type="radio" name="logistics_api" {if condition="$row.logistics_api eq 0 " }
                                       checked{/if} value="0" >不需要快递接口
                            </label>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="control-label">负责人：</label>
                        <div class="col-sm-7">
                            <input type="text" class="input-max" data-rule-maxlength="40" data-rule-required="true"
                                   data-msg-required="负责人不能为空" name="f_name" value="{$row.f_name}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label">联系电话：</label>
                        <div class="col-sm-7">
                            <input type="text" class="input-max" data-rule-maxlength="40" data-rule-required="true"
                                   data-msg-required="联系电话不能为空" name="tel" value="{$row.tel}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label">所属公司：</label>
                        <div class="col-sm-7">
                            <input type="text" class="input-max" data-rule-maxlength="40" data-rule-required="true"
                                   data-msg-required="所属公司不能为空" name="company" value="{$row.company}">
                        </div>
                    </div>


                </div>
                <footer class="footer">
                    <div class="form-group">
                        <div class="col-sm-4 col-sm-offset-1">
                            <input name="id" type="hidden" value="{$row.id|intval}">
                            <button type="submit" class="btn btn-primary js_save_submit" data-loading-text="保存中...">保存
                            </button>
                            <button type="button" class="btn btn-default" data-toggle="back">取消</button>
                        </div>
                    </div>
                </footer>

            </section>
        </section>


    </section>
</form>
{/block}

{block name="footer" }
<script type="text/javascript">
    seajs.use(["dist/plupload/init.js"])
</script>
{/block}